import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { FormsModule } from '@angular/forms';
//import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { DataService } from './data_service';
import { BooklistComponent } from './booklist/booklist.component';
import { AdminComponent } from './admin/admin.component';
import { AddbookComponent } from './addbook/addbook.component';
import { UpdatebookComponent } from './updatebook/updatebook.component';

@NgModule({
  declarations: [
    AppComponent,
    BooklistComponent,
    AdminComponent,
    AddbookComponent,
    UpdatebookComponent
  ],
  //在引入angular的那些包后要在下面再一次使用
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    HttpClientModule,
  ],
  //
  providers: [DataService],
  bootstrap: [AppComponent]
})
export class AppModule { }
